package com.dianpingmedia.simulate.model;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.util.Map;

public class SimulateUploadEntity {
    public static class Request {
        private String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        @NotBlank(message = "url can't be empty")
        private String url;

        private String md5;

        @NotBlank(message = "name can't be empty")
        private String name;
        @Range(min = 0, max = 1, message = "type is not support")
        @NotNull(message = "type can't be empty")
        private Integer type;

        private Integer materialType;

        public Integer getMaterialType() {
            return materialType;
        }

        public void setMaterialType(Integer materialType) {
            this.materialType = materialType;
        }

        private Integer duration;

        private Integer[] dspIds;

        private Notice[] notices;

        private Integer width;

        private Integer height;


        public Integer getWidth() {
            return width;
        }

        public void setWidth(Integer width) {
            this.width = width;
        }

        public Integer getHeight() {
            return height;
        }

        public void setHeight(Integer height) {
            this.height = height;
        }

        public Integer[] getDspIds() {
            return dspIds;
        }

        public void setDspIds(Integer[] dspIds) {
            this.dspIds = dspIds;
        }


        public static class Notice {
            private Integer noticeType;
            private String noticeUrl;
            private Integer returnCode;
            private Map<String, String> macros;

            public Map<String, String> getMacros() {
                return macros;
            }

            public void setMacros(Map<String, String> macros) {
                this.macros = macros;
            }

            public Integer getNoticeType() {
                return noticeType;
            }

            public void setNoticeType(Integer noticeType) {
                this.noticeType = noticeType;
            }

            public String getNoticeUrl() {
                return noticeUrl;
            }

            public void setNoticeUrl(String noticeUrl) {
                this.noticeUrl = noticeUrl;
            }

            public Integer getReturnCode() {
                return returnCode;
            }

            public void setReturnCode(Integer returnCode) {
                this.returnCode = returnCode;
            }
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getMd5() {
            return md5;
        }

        public void setMd5(String md5) {
            this.md5 = md5;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }

        public Integer getDuration() {
            return duration;
        }

        public void setDuration(Integer duration) {
            this.duration = duration;
        }

        public Notice[] getNotices() {
            return notices;
        }

        public void setNotices(Notice[] notices) {
            this.notices = notices;
        }
    }


    public static class Response {
        private Integer errorCode;
        private String messgae;
        private String id;

        public Integer getErrorCode() {
            return errorCode;
        }

        public void setErrorCode(Integer errorCode) {
            this.errorCode = errorCode;
        }

        public String getMessgae() {
            return messgae;
        }

        public void setMessgae(String messgae) {
            this.messgae = messgae;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
    }

}
